<template>
<div class="tableDiv"  style="background: blueviolet">
<!--  :data="tableData.filter(data => !search || data.name.toLowerCase().includes(search.toLowerCase()))"-->
  <el-table
      :data="tableData"
      style="width: 100%">
    <el-table-column
        prop="resultMedicne"
        label="药物"
        width="180">
    </el-table-column>
    <el-table-column
        prop="sortNum"
        label="频次"
        width="180">
    </el-table-column>
  </el-table>
</div>
</template>

<script>

export default {
  name: "TableDiv",

  data() {
    return {
      // this.$store.state.frequencyReturnData
      tableData: JSON.parse(JSON.stringify(this.$store.state.frequencyReturnData)),
      search: ''
    }
  },
  // mounted() {
  //   var that=this;
  //   this.$axios.post("https://www.fastmock.site/mock/11f9eec63c5ea2a03f15ca4d9e5a6a3d/itcas/test").then(function (res) {
  //     that.tableData= res.data.data.list;
  //     console.log(res.data.data.list);
  //   }).catch(function(error) {
  //     console.log("error")
  //   })
  // },
  methods: {
    handleEdit(index, row) {
      console.log(index, row);
      alert(index+"--"+row.name)
    },

  },
}
</script>

<style scoped>
.tableDiv{

  width: auto;
  height: auto;
}
</style>
